package com.lovo.homework;

public class Card {
    /**
     * 点数
     */
    private String point;
    /**
     * 花色（黑桃、红心、梅花、方块，♠、♥、♣、♦）
     */
    private String type;
    /**
     * 每张牌都要有个值，便于排序
     */
    private int pointValue;
    /**
     * 每张牌花色都有一个值
     * 尺寸 105x150 px
     */
    private int num;



    //无参构造
    public Card() {
    }

    //初始化牌的时候，需要的属性
    public Card(String point, String type, int pointValue, int num) {
        this.point = point;
        this.type = type;
        this.pointValue = pointValue;
        this.num = num;
    }

    public Card(String point, String type) {
        this.point = point;
        this.type = type;
    }


    //重写
    @Override
    //只需要输出的是点数和花色
    public String toString() {
        return type + point;
    }

    public String getPoint() {
        return point;
    }

    public void setPoint(String point) {
        this.point = point;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public int getNum() {
        return num;
    }

    public void setNum(int num) {
        this.num = num;
    }

    public int getPointValue() {
        return pointValue;
    }

    public void setPointValue(int pointValue) {
        this.pointValue = pointValue;
    }
}


